package com.globalresources.dao.inface;

import java.util.List;

import com.globalresources.po.Relation;
import com.trg.dao.dao.standard.GenericDAO;

/**
 * @author aaron.lu(luzhiyuan) E-mail:atyuan.lu@gmail.com
 * @since 创建时间：Jul 14, 2009 12:11:21 AM
 */
public interface IRelationDao extends GenericDAO<Relation, Integer> {
	
	/**
	 * query the relation data
	*@author aaron.lu(luzhiyuan)
	*@param username
	*@param authority
	*@return
	 */
	public List<Relation> getRelations(String username, String authority);
	
	/**
	 * count the relation by username or autority
	*@author aaron.lu(luzhiyuan)
	*@param username
	*@param authority
	*@return
	 */
	public int countRelations(String username, String authority);

}
